Introduction to SAS Functions

نویسنده

  • Neil Howard
چکیده

A FUNCTION returns a value from a computation or system manipulation that requires zero or more arguments. And, like most programming languages, the SAS System provides an extensive library of “built-in” functions. SAS has more than 190 functions for a variety of programming tasks. This tutorial will cover the syntax for invoking functions, an overview of the functions available, examples of commonly used functions, selected character handling and numeric functions, and some tricks and applications of functions that will surprise you. Breaking Down a FUNCTION Syntax Given the above definition of a function, the syntax and components should be examined. A function recognized in a SAS statement by the use of a function name, followed immediately by function argument(s), separated by commas, and enclosed in parentheses. For a function requiring two arguments the syntax is as follows: FUNCTIONNAME(argument-1, argument-2) where the arguments are: constants variables expressions other functions Several functions take no arguments, in which case a null set of parentheses is required. For instance, the TODAY function returns today’s date from the system clock, requiring no arguments: DATA NEW; X = TODAY() ; PUT ‘X= ‘ X MMDDYY8. ; RUN;

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

159-2011: Perl Regular Expression in SAS® Macro Programming

In this paper, the Perl regular expression facility that provides a concise and flexible means for matching strings of text is extended to the macro environment using three new macro functions. Consequently, this allows direct pattern matching and replacement in macro variables, facilitating the construction of flexible and customized functions through internally parsing patterned inputs. This ...

متن کامل

Pseudo - Random Numbers : Out of Uniform

Pseudo-random numbers – both uniform and non-uniform – are used in random sampling, simulation, and Monte-Carlo estimation. Base SAS software contains numerous random number, quantile, and probability functions allowing the user to generate a selection of nominal, discrete, and continuous random variates. Other variates may be generated with a data step, often making use of SAS functions. We wi...

متن کامل

Learning SAS by Example: A Programmer's Guide

learning sas by example example code and data for learning sas by example: a learning sas by example a programmers guide blkhawk learning sas by example a programmers guide ggda resources for learning sas learning sas by example a programmers guide ebook introduction running sas syllabus university of new mexico praise from the experts online tutorials ( books & videos) learning sas by example:...

متن کامل

State Space Modeling Using SAS

This article provides a brief introduction to the state space modeling capabilities in SAS, a well-known statistical software system. SAS provides state space modeling in a few different settings. SAS/ETS, the econometric and time series analysis module of the SAS system, contains many procedures that use state space models to analyze univariate and multivariate time series data. In addition, S...

متن کامل

Trans-natural antisense transcripts including noncoding RNAs in 10 species: implications for expression regulation

Natural antisense transcripts are at least partially complementary to their sense transcripts. Cis-Sense/Antisense pairs (cis-SAs) have been extensively characterized and known to play diverse regulatory roles, whereas trans-Sense/Antisense pairs (trans-SAs) in animals are poorly studied. We identified long trans-SAs in human and nine other animals, using ESTs to increase coverage significantly...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999